package demo2;

import demo1.Goods;

import java.util.ArrayList;

public class test2 {
    public static void main(String[] args) {
        Goods goods1 = new Goods("1","手机",1000);
        Goods goods2 = new Goods("2","手表",500);
        Goods goods3 = new Goods("3","手电",5000);
        ArrayList<Goods> goodsList = new ArrayList<>();
        goodsList.add(goods1);
        goodsList.add(goods2);
        goodsList.add(goods3);
        System.out.println(ArrayUtil.getMax(goodsList));

    }
}
